home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW etc / MPW-GM / MPW / Startup < prev    next >
Encoding:
Text File  |  1998-06-15  |  11.7 KB  |  351 lines  |  [TEXT/MPS ]

  1. #    Startup - MPW Shell Startup File
  2. #
  3. #    Copyright Apple Computer, Inc. 1985-1998
  4. #    All Rights Reserved.
  5.  
  6.  
  7. #    {Boot} - The boot disk.  (Predefined.)
  8.             Export Boot
  9.  
  10. #    {SystemFolder} - The directory that contains System & Finder.  (Predefined.)
  11.             Export SystemFolder
  12.  
  13. #    {ShellDirectory} - The directory that contains MPW Shell.  (Predefined.)
  14.             Export ShellDirectory
  15.  
  16. #    {Active} - The active (topmost) window.  (Predefined.)
  17.             Export Active
  18.  
  19. #    {Target} - The target (previously active) window.  (Predefined.)
  20.             Export Target
  21.  
  22. #    {Worksheet} - The name of the Worksheet window.  (Predefined.)
  23.             Export Worksheet
  24.  
  25. #    {Status} - The result of the last command executed.  (Predefined.)
  26.             Export Status
  27.  
  28. #    {User} - Automatically defined to the name that appears in the Chooser.
  29.             Export User
  30.  
  31. #    {MPW} - The volume or folder containing the Macintosh Programmer's Workshop.
  32. #            If you put the MPW Shell out on the desktop, redefine this variable
  33. #            to be {Boot}MPW:
  34.             Set MPW "{ShellDirectory}"
  35.             Export MPW
  36.  
  37. #    {MPWVersion} - Version of MPW
  38.             Export MPWVersion
  39.     
  40. #    Export internal variables  
  41.  
  42. #    {AllowCmdsOnlyInWorkSheet} -- allow enter key to execute commands only in worksheet
  43.             Export AllowCmdsOnlyInWorkSheet
  44.     
  45. #    {AllowColorizing} -- turn text coloring on and off    
  46.         Export AllowColorizing
  47.  
  48. #    {AllowDraggingOut} -- allow drag and drop out of MPW windows
  49.         Export AllowDraggingOut
  50.         
  51. #    {AllowMultipleUndo} -- allow multiple undo
  52.         Export AllowMultipleUndo
  53.         
  54. #    {CursorForDragging}    -- set the cursor to be displayed for drag and drop
  55.         Export CursorForDragging
  56.         
  57. #    {ExtendWordSet}
  58.         Export ExtendWordSet
  59.         
  60. #    {InhibitMarkCopy}
  61.         Export InhibitMarkCopy
  62.         
  63. #    {NewKeyboardLayout}
  64. #        Export NewKeyboardLayout
  65.         
  66. #    {ScreenUpdateDelay}
  67.         Export ScreenUpdateDelay
  68.         
  69. #    {ToolSleepTime}
  70.         Export ToolSleepTime
  71.  
  72. #    {Commands} - Directories to search for commands.  As of ETO 20 we have introduced
  73. #                    the concept of a user commands directory where you put your
  74. #                    personal commands.  We've also merged the tools and scripts
  75. #                    directories into a single directory called "Commands"
  76.             Set Commands ":"
  77.             If "`Exists -q "{MPW}User Commands:"`" 
  78.                 Set Commands "{Commands}","{MPW}User Commands:"
  79.             End
  80.             If "`Exists -q "{MPW}Commands:"`" 
  81.                 Set Commands "{Commands}","{MPW}Commands:"
  82.             End
  83.             If "`Exists -q "{MPW}Tools:"`" 
  84.                 Set Commands "{Commands}","{MPW}Tools:"
  85.             End
  86.             If "`Exists -q "{MPW}Scripts:"`" 
  87.                 Set Commands "{Commands}","{MPW}Scripts:"
  88.             End
  89.             Export Commands
  90.             
  91. #     {PrefsFolder} - Directory to search for userstartup and quit scripts. (Predefined.)
  92. #                    The shell looks in the {PrefsFolder} and then the {MPW} 
  93. #                    folder for startup and quit scripts.  {PrefsFolder} defaults to
  94. #                    {SystemFolder}Preferences:MPW.  You may change this here, 
  95. #                    or create an alias named MPW in the preferences folder to 
  96. #                    reference the folder where you keep your startup
  97. #                    scripts and worksheet.  
  98.             Export PrefsFolder
  99.             
  100. #    {TempFolder}  - Directory for temporary items.   (Predefined.)
  101. #                    The shell may create some temporary items here.
  102. #                    Defaults to {PrefsFolder}TempMPW.
  103.             Export TempFolder
  104.         
  105. #    {SysTempFolder}  - Directory for temporary items.   (Predefined.)
  106. #                    The shell may create some temporary items here.
  107. #                    Defaults to "{Boot}Temporary Items".
  108.             Export SysTempFolder
  109.         
  110. #    As of ETO 20 we are moving towards having interfaces and
  111. #    libraries optionally outside the MPW folder.
  112. #    The new behavior is to first look up one level from
  113. #    the mpw directory for the interfaces and libraries
  114.  
  115.     If "`Exists -q "{MPW}:Interfaces&Libraries:"`" 
  116.         Set InterfacesandLibrariesLocation "{MPW}:Interfaces&Libraries:"
  117.     Else
  118.         Set InterfacesandLibrariesLocation "{MPW}"
  119.     End
  120.     
  121. #    {AIncludes} - Directories to search for assembly language include files.            
  122.             Set AIncludes "{InterfacesandLibrariesLocation}Interfaces:AIncludes:"
  123.             Export AIncludes
  124.             
  125. #    {Libraries} - Directory that contains shared libraries.         
  126.             Set Libraries "{InterfacesandLibrariesLocation}Libraries:Libraries:"
  127.             Export Libraries
  128.             
  129. #    {CIncludes} - Directories to search for C include files.
  130.             Set CIncludes "{InterfacesandLibrariesLocation}Interfaces:CIncludes:"
  131.             Export CIncludes
  132.  
  133. #    {CLibraries} - Directory that contains C libraries.         
  134.             Set CLibraries "{InterfacesandLibrariesLocation}Libraries:CLibraries:"
  135.             Export CLibraries
  136.             
  137.             if not "`Exists -q "{InterfacesandLibrariesLocation}Libraries:CLibraries:"`"
  138.                 Set CLibraries "You have not installed the CLibraries for 68K development."
  139.             end
  140.             
  141. #    {SCIncludes} - Directories to search for C include files.
  142.             Set SCIncludes "{InterfacesandLibrariesLocation}Interfaces:CIncludes:"
  143.             Export SCIncludes
  144.  
  145. #    {PPCCIncludes} - Directories to search for PowerPC include files.
  146.             Set PPCCIncludes "{InterfacesandLibrariesLocation}Interfaces:CIncludes:"
  147.             Export PPCCIncludes
  148.  
  149. #    {PPCLibraries} - Directory that contains PowerPC libraries. 
  150.             Set PPCLibraries "{InterfacesandLibrariesLocation}"Libraries:PPCLibraries:
  151.             Export PPCLibraries
  152.  
  153.             if not "`Exists -q "{InterfacesandLibrariesLocation}Libraries:PPCLibraries:"`"
  154.                 Set PPCLibraries "You have not installed the CLibraries for PowerPC development."
  155.             end
  156.  
  157. #    {PInterfaces} - Directories to search for Pascal interface files.
  158.             Set PInterfaces "{InterfacesandLibrariesLocation}Interfaces:PInterfaces:"
  159.             Export PInterfaces
  160.  
  161. #    {PLibraries} - Directory that contains Pascal libraries.        
  162.             Set PLibraries "{InterfacesandLibrariesLocation}Libraries:PLibraries:"
  163.             Export PLibraries
  164.             
  165.             if not "`Exists -q "{InterfacesandLibrariesLocation}Libraries:PLibraries:"`"
  166.                 Set PLibraries "You have not installed the Libraries for Pascal development."
  167.             end
  168.  
  169. #    {RIncludes} - Directory that contains Rez include files.
  170.             Set RIncludes "{InterfacesandLibrariesLocation}Interfaces:RIncludes:"
  171.             Export RIncludes
  172.  
  173. #    {CFM68KLibraries} - Directory that contains CFM-68K static link libraries.         
  174.             Set CFM68KLibraries "{InterfacesandLibrariesLocation}Libraries:CFM68KLibraries:"
  175.             Export CFM68KLibraries
  176.             
  177.             if not "`Exists -q "{InterfacesandLibrariesLocation}Libraries:CFM68KLibraries:"`"
  178.                 Set CFM68KLibraries "You have not installed the Libraries for CFM 68K development."
  179.             end
  180.  
  181. #    {SharedLibraries} - Directory that contains "fat" PEF-format import libraries.         
  182.             Set SharedLibraries "{InterfacesandLibrariesLocation}Libraries:SharedLibraries:"
  183.             Export SharedLibraries
  184.  
  185.             Unset InterfacesandLibrariesLocation
  186.             
  187. #    {CaseSensitive} - If non-zero, pattern matching is case sensitive.
  188.             Set CaseSensitive 0
  189.             Export CaseSensitive
  190.  
  191. #    {SearchBackward} - If non-zero, search will go backwards.
  192.             Set SearchBackward 0
  193.             Export SearchBackward
  194.  
  195. #    {SearchWrap} - If non-zero, search will wrap.
  196.             Set SearchWrap 0
  197.             Export SearchWrap
  198.  
  199. #    {SearchType} - Specifies the default searching type.  (0/literal,
  200. #        1/word, 2/regular expression)
  201.             Set SearchType 0
  202.             Export SearchType
  203.  
  204. #    {Tab} - Default tab setting for new windows.
  205.             Set Tab 4
  206.             Export Tab
  207.  
  208. #    {Font} - Default Font for new windows.
  209.             Set Font MPW
  210.             Export Font
  211.  
  212. #    {FontSize} - Default font size for new windows.
  213.             Set FontSize 9
  214.             Export FontSize
  215.  
  216. #    {AutoIndent} - If non-zero, auto indentation will be the default for
  217. #        new windows.
  218.             Set AutoIndent 1
  219.             Export AutoIndent
  220.  
  221. #    {WordSet} - Character set that defines words for searches and double-clicks.
  222.             Set WordSet 'a-zA-Z_0-9'
  223.             Export WordSet
  224.  
  225. #    {PrintOptions} - Options used by the Print Window and Print Selection menus.
  226.             Set PrintOptions '-h'
  227.             Export PrintOptions
  228.             
  229. #    {Exit} - If non-zero, command files terminate after the first error.
  230.             Set Exit 1
  231.             Export Exit
  232.  
  233. #    {Echo} - If non-zero, commands are echoed before execution.
  234.             Set Echo 0
  235.             Export Echo
  236.  
  237. #    {Test} - If non-zero, tools and applications are not executed.
  238.             Set Test 0
  239.             Export Test
  240.  
  241. #    {MarkAlphabetical} - If non-zero, marks will be listed alphabetically in the menu
  242. #        by default.
  243.             Set MarkAlphabetical 0
  244.             Export MarkAlphabetical
  245.  
  246. #    Commando Support
  247.              Export Windows
  248.              Export Aliases
  249.              Set Commando Commando
  250.             Export Commando
  251.  
  252. #    Aliases
  253.             Alias File Target
  254.  
  255. #    Clean up temporary files that are left over from a previous run.
  256.               (Delete -i -y "{MPW}"MPW.Pipe-≈ || Set Status 0) ∑dev:null
  257.         
  258. #    The file UserStartup can be used to override definitions made in Startup,
  259. #    or to define additional variables, exports, and aliases.  UserStartup may
  260. #    also be used to define menu items, open windows, etc.  The file should be
  261. #    located in the directory containing the MPW Shell, or in your preferences 
  262. #     folder.
  263.  
  264. #            If "{PrefsFolder}" && "`Exists -q "{PrefsFolder}UserStartup"`"
  265. #                Execute "{PrefsFolder}UserStartup"
  266. #            Else
  267. #                Execute "{ShellDirectory}UserStartup"
  268. #            End
  269.  
  270. #    As of ETO 20 we have decided that it made more sense to make all "Userstartup"
  271. #    files sacred, i.e. they will never be replaced during an installation of MPW.
  272. #   In fact the entire "Startup Folder" and "Quit Folder" are now off-limits
  273. #     for the MPW installer.  The  following used to appear in the UserStartup file.
  274.  
  275. #    Create the Project menu
  276.  
  277. if "`Exists -q "{PrefsFolder}"UserProjectMenu`"
  278.     Execute "{PrefsFolder}"UserProjectMenu
  279. else if "`Exists -q "{MPW}"UserProjectMenu`"
  280.     Execute "{MPW}"UserProjectMenu
  281. else
  282.     ProjectMenu    # the default project menu
  283. end
  284.  
  285. #    Create the Directory menu
  286.  
  287. #    The parameters to DirectoryMenu become the initial list of directories
  288. #    in the Directory menu.  The parameters below specify each of the 
  289. #    Examples directories, and the current directory.  Replace them with
  290. #    your favorite directories.
  291.  
  292. if "`Exists -q "{PrefsFolder}"UserDirectoryMenu`"
  293.     Execute "{PrefsFolder}"UserDirectoryMenu
  294. else if "`Exists -q "{MPW}"UserDirectoryMenu`"
  295.     Execute "{MPW}"UserDirectoryMenu
  296. else
  297.     DirectoryMenu `(Files -d -i "{MPW}"Examples:≈ || Set Status 0) ≥ Dev:Null` ∂
  298.         `Directory`    
  299. end
  300.  
  301. #    Create the Build Menu
  302.  
  303. if "`Exists -q "{PrefsFolder}"UserBuildMenu`"
  304.     Execute "{PrefsFolder}"UserBuildMenu
  305. else if "`Exists -q "{MPW}"UserBuildMenu`"
  306.     Execute "{MPW}"UserBuildMenu
  307. else
  308.     BuildMenu
  309. end
  310.  
  311.  
  312. #     Add MPW Help to the Help menu.
  313. #    Since this option is only supported in MPW Shell 3.3 and later, we
  314. #    ignore any errors which may be reported by earlier shells.
  315.  
  316.     AddMenu -help 'MPW Help…' 'InteractiveHelp' ∑ Dev:Null || set Status 0
  317.     
  318. #    Since UserStartup is distributed with MPW, you may want to have other
  319. #    startup files that will not be overwritten with a new release.
  320. #    Other personalized startup files may be named UserStartup•≈ - such as 
  321. #    "UserStartup•John" or "UserStartup•Tom"  (• is option-8), and placed
  322. #    in the MPW Preferences folder ({PrefsFolder}).  Alternately, you can
  323. #    place additional startup items in the "Startup Items" folder located
  324. #    in the directory containing the MPW Shell.  The items in the
  325. #    "Startup Items" folder do not have any special naming conventions, and
  326. #    will be executed in alphabetical order.  They can also be any type of
  327. #    executable entity, such as scripts, tools, and/or applications.
  328. #
  329. #    The following executes such files found in either place.
  330.  
  331.             If "{PrefsFolder}"
  332.                 For __Startup__i in `(Files -t 'TEXT' -f -s "{PrefsFolder}"UserStartup•≈ || Set Status 0) ≥ dev:null`
  333.                     Execute "{__Startup__i}"
  334.                 End
  335.             End
  336.             
  337.             # Execute scripts, tools and applications.
  338.             # Ignore everything else.
  339.             For __Startup__i in `(Files -t 'TEXT' -f -s "{ShellDirectory}Startup Items:" || Set Status 0; Files -t 'APPL' -f -s "{ShellDirectory}Startup Items:" || Set Status 0; Files -t 'MPST' -f -s "{ShellDirectory}Startup Items:" || Set Status 0) ≥ dev:null`
  340.                 Execute "{__Startup__i}"
  341.             End
  342.  
  343.             # this method of running custom startup scripts is obsolete, and will be removed
  344.             # in a future version of this script.  Please move your UserStartup• scripts into
  345.             # the new :Startup Items: folder.
  346.             For __Startup__i in `(Files -t 'TEXT' -f -s "{ShellDirectory}"UserStartup•≈ || Set Status 0) ≥ dev:null`
  347.                 Execute "{__Startup__i}"
  348.             End
  349.  
  350.             Unset __Startup__i
  351.